// // Server Cluster Codes: 0=CMS | 1=LISTINGS | 2=SEARCH // var strTopLevelLinks = [ "/default", "/listings/", "/category.jspa?categoryID=700000006", "/tv/", "/news/", "/movies/", "/DVD/", "/sports/", "/soaps/", "/games/", "/spot/" ]; var strTopLevelPages = [ "HOME", "LISTINGS", "BLOGS", "TV CENTRAL", "NEWS", "MOVIES", "DVD", "SPORTS", "SOAPS", "GAMES", "TV GUIDE SPOT" ]; var iTopLevelSrvrs = [ 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0 ]; var strListingsPages = ["Listings Grid", "TV Guide Channel", "Sports Guide", "Movie Guide", "Family Guide", "Health Guide", "VCR+", "ShowGuides"]; var strListingsLinks = ["/listings/", "/listings/channel/", "/sports/", "/movies/", "/special/familyguide/", "/special/healthguide/", "/listings/vcrplus/", "/tv/showguide/"]; var iListingsSrvrs = [1, 1, 0, 0, 1, 1, 1, 0]; var strTvPages = ["Hot List", "The Watercooler", "Online Video Guide", "Televisionary", "Matt Roush", "Magazine", "ShowGuides", "Movies on TV & PPV", "TV Tech"]; var strTvLinks = ["/tv/hotlist/", "/category.jspa?categoryID=700000007", "/forum.jspa?forumID=800003815&start=0", "/forum.jspa?forumID=700000631", "/tv/roush/review", "/tv/magazine/", "/tv/showguide/", "/movies/ontv/", "/tv/tech/news/"]; var iTvSrvrs = [0, 3, 3, 3, 0, 0, 0, 0, 0]; var strNewsPages = ["Entertainment News", "Insider", "Michael Ausiello", "Podcast", "The Biz", "Caught in the Act", "TV Guide Magazine"]; var strNewsLinks = ["/forum.jspa?forumID=700000044", "/news/insider/", "/forum.jspa?forumID=700000049", "/news/podcast/", "/news/thebiz/", "/news/caught/", "/tv/coverstory/"]; var iNewsSrvrs = [3, 0, 3, 0, 0, 0, 0]; var strMoviesPages = ["Big Movie Guide", "In Theaters", "On TV & Pay-Per-View", "Ask Flickchick", "Coming Soon"]; var strMoviesLinks = ["/movies/?tab=bmg", "/movies/intheaters/", "/movies/ontv/", "/forum.jspa?forumID=700000633", "/movies/coming/"]; var iMoviesSrvrs = [0, 0, 0, 3, 0]; var strDvdPages = ["Movies on DVD", "TV on DVD"]; var strDvdLinks = ["/DVD/MoviesOnDvd/", "/DVD/TvOnDvd/"]; var iDvdSrvrs = [0, 0]; // var strSportsPages = ["Big Sports Guide"]; // var strSportsLinks = ["/sports/"]; // var iSportsSrvrs = [0]; var strSoapsPages = ["Daily Updates", "Q&A", "News", "Previews"]; var strSoapsLinks = ["/soaps/updates/", "/soaps/qa/", "/forum.jspa?forumID=700000047", "/soaps/previews/"]; var iSoapsSrvrs = [0, 0, 3, 0]; var strGamesPages = ["Big Network Boss", "You Sexy Thing!", "FotoFlip", "MatchMaker", "Horoscopes", "Crossword", "Trivia", "Cover Gallery", "Don't Quote Me", "Get It Together"]; var strGamesLinks = ["/games/arkadium/bignetworkboss/", "/games/yst/", "/games/fotoflip/", "/games/matchmaker/", "/games/horoscopes/", "/games/crossword/", "/games/trivia/", "/games/covergallery/", "/games/dontquoteme/", "/games/jigsaw/"]; var iGamesSrvrs = [1, 0, 0, 0, 0, 0, 1, 1, 0, 0]; var bEnableCommunity = true; var theLastDiv = null; var theLastHref = null; var theLastSubNav = null; var to_id = null; var iMasterWidth = 970; var strCmsSrvr = "http://www.tvguide.com"; var strListingsSrvr = "http://online.tvguide.com"; var strSearchSrvr = "http://online.tvguide.com"; var strCommunitySrvr = "http://community.tvguide.com"; function initializeLinks() { // last minute changes and test code here } function navMouseOver(theDiv, navIndex) { if(theLastDiv) { theLastDiv.style.backgroundColor = "#333333"; theLastDiv.style.color = "#FFFFFF"; } theLastDiv = theDiv; if(theLastHref) { theLastHref.style.color = "#FFFFFF"; } var theHref = document.getElementById("TopNavItem"+navIndex); theHref.style.color = "#000000"; theDiv.style.backgroundColor = "#CCCCCC"; theDiv.style.color = "#000000"; theLastHref = theHref; if(theLastSubNav) { theLastSubNav.style.display = 'none'; theLastSubNav.style.visibility = 'hidden'; } var theSubNav = document.getElementById("SubNav"+navIndex); theSubNav.style.visibility = 'visible'; theSubNav.style.display = 'block'; theLastSubNav = theSubNav; clearTimeout(to_id); to_id = setTimeout('setDefaultNav()',10000); } function navSubMouseOver(theHref) { theHref.style.color="#CC0000"; clearTimeout(to_id); to_id = setTimeout('setDefaultNav()',10000); } function getSubNavPages(iIndex) { if(bEnableCommunity) { switch(iIndex) { case 0: break; case 1: return strListingsPages; case 3: return strTvPages; case 4: return strNewsPages; case 5: return strMoviesPages; case 6: return strDvdPages; // case 8: return strSportsPages; case 8: return strSoapsPages; case 9: return strGamesPages; // skip case 10 TV Spot } } else { switch(iIndex) { case 0: break; case 1: return strListingsPages; case 2: return strTvPages; case 3: return strNewsPages; case 4: return strMoviesPages; case 5: return strDvdPages; // case 6: return strSportsPages; case 7: return strSoapsPages; case 8: return strGamesPages; // skip case 9 TV Spot } } return ""; } function getSubNavSrvrs(iIndex) { if(bEnableCommunity) { switch(iIndex) { case 0: break; case 1: return iListingsSrvrs; case 3: return iTvSrvrs; case 4: return iNewsSrvrs; case 5: return iMoviesSrvrs; case 6: return iDvdSrvrs; // case 7: return iSportsSrvrs; case 8: return iSoapsSrvrs; case 9: return iGamesSrvrs; // skip case 10 TV Spot } } else { switch(iIndex) { case 0: break; case 1: return iListingsSrvrs; case 2: return iTvSrvrs; case 3: return iNewsSrvrs; case 4: return iMoviesSrvrs; case 5: return iDvdSrvrs; // case 6: return iSportsSrvrs; case 7: return iSoapsSrvrs; case 8: return iGamesSrvrs; // skip case 9 TV Spot } } return ""; } function getSubNavLink(iSubNav, iIndex) { if(bEnableCommunity) { switch(iSubNav) { case 0: break; case 1: return strListingsLinks[iIndex]; case 3: return strTvLinks[iIndex]; case 4: return strNewsLinks[iIndex]; case 5: return strMoviesLinks[iIndex]; case 6: return strDvdLinks[iIndex]; // case 7: return strSportsLinks[iIndex]; case 8: return strSoapsLinks[iIndex]; case 9: return strGamesLinks[iIndex]; // skip case 10 TV Spot } } else { switch(iSubNav) { case 0: break; case 1: return strListingsLinks[iIndex]; case 2: return strTvLinks[iIndex]; case 3: return strNewsLinks[iIndex]; case 4: return strMoviesLinks[iIndex]; case 5: return strDvdLinks[iIndex]; // case 6: return strSportsLinks[iIndex]; case 7: return strSoapsLinks[iIndex]; case 8: return strGamesLinks[iIndex]; // skip case 9 TV Spot } } return ""; } function drawSecondLevelNavItem(iIndex, iNumItems) { var strHTML = ""; var strPages = getSubNavPages(iIndex); var iSrvrs = getSubNavSrvrs(iIndex); strHTML += ""; return strHTML; } function setDefaultNav() { var navIndex = 0; // FIX THIS TO POINT TO REAL DEFAULT var thePath = document.location.pathname.toLowerCase(); thePath = thePath.match("^/([^/]+)[/]*"); if(thePath.length>0) { switch(thePath[1]) { case "listings" : navIndex = 1; break; case "tv" : navIndex = 2; break; case "news" : navIndex = 3; break; case "movies" : navIndex = 4; break; case "dvd" : navIndex = 5; break; case "sports" : navIndex = 6; break; case "soaps" : navIndex = 7; break; case "games" : navIndex = 8; break; case "spot" : navIndex = 9; break; } } if(navIndex>=0) { var theDiv = document.getElementById("topNavDiv"+navIndex); navMouseOver(theDiv, navIndex); clearTimeout(to_id); } } function drawTopLevelNavItem(iIndex, iNumItems) { var strFullURL; switch(iTopLevelSrvrs[iIndex]) { case 0: strFullURL = strCmsSrvr + strTopLevelLinks[iIndex]; break; case 1: strFullURL = strListingsSrvr + strTopLevelLinks[iIndex]; break; case 2: strFullURL = strSearchSrvr + strTopLevelLinks[iIndex]; break; case 3: strFullURL = strCommunitySrvr + strTopLevelLinks[iIndex]; break; } var strHTML = ""; strHTML += ""; strHTML += "
"; strHTML += ""; strHTML += ""; strHTML += ""; strHTML += ""; strHTML += "
" + strTopLevelPages[iIndex] + "
"; strHTML += "
"; strHTML += ""; return strHTML; } function initServerLinks() { var strHost = document.location.host.toLowerCase(); var strRefer = ""; var strTmpCms = ""; if(document.referrer) { strRefer = document.referrer.toLowerCase(); if(strRefer.length>0) { strRefer = strRefer.match("^http://([^/]+)[/]*"); if(strRefer.length>=2) { strTmpCms = strRefer[1]; } } } switch(strHost) { case "cmsauthor.tvguide.com" : strCmsSrvr = ""; strListingsSrvr = "http://onlinedev.tvguide.com"; strSearchSrvr = "http://onlinedev.tvguide.com"; bEnableCommunity = true; break; case "onlinedev.tvguide.com" : strCmsSrvr = "http://cmsauthor.tvguide.com"; strListingsSrvr = ""; strSearchSrvr = ""; if(strTmpCms.length>0) { strCmsSrvr = "http://" + strTmpCms; } bEnableCommunity = true; break; case "www.tvguide.com" : strCmsSrvr = ""; strListingsSrvr = "http://online.tvguide.com"; strSearchSrvr = "http://online.tvguide.com"; break; case "online.tvguide.com" : strCmsSrvr = "http://www.tvguide.com"; strListingsSrvr = ""; strSearchSrvr = ""; break; case "localhost" : strCmsSrvr = ""; strListingsSrvr = "http://onlinedev.tvguide.com"; strSearchSrvr = "http://onlinedev.tvguide.com"; bEnableCommunity = true; break; case "dtepper-470.tvguide.com" : strCmsSrvr = ""; strListingsSrvr = "http://onlinedev.tvguide.com"; strSearchSrvr = "http://onlinedev.tvguide.com"; bEnableCommunity = true; break; } // make adjustments based on referrer var refer = document.referrer.toLowerCase(); if(refer.length>0) { refer = refer.replace("http://",""); var i = refer.indexOf("/"); if(i>0) { refer = refer.substring(0,i); if(refer!=strHost) { switch(refer) { case "cmsauthor.tvguide.com" : strCmsSrvr = "http://cmsauthor.tvguide.com"; strListingsSrvr = "http://onlinedev.tvguide.com"; strSearchSrvr = "http://onlinedev.tvguide.com"; bEnableCommunity = true; break; case "localhost" : strCmsSrvr = "http://localhost"; strListingsSrvr = "http://onlinedev.tvguide.com"; strSearchSrvr = "http://onlinedev.tvguide.com"; bEnableCommunity = true; break; case "dtepper-470.tvguide.com" : strCmsSrvr = "http://dtepper-470.tvguide.com"; strListingsSrvr = "http://onlinedev.tvguide.com"; strSearchSrvr = "http://onlinedev.tvguide.com"; bEnableCommunity = true; break; } } } } // finally, check for ajax grid if(readCookie("useAJAX")=="1") { strTopLevelLinks[1] = "/listings/ajaxgrid/"; strListingsLinks[0] = "/listings/ajaxgrid/"; } } function drawNavBar() { initServerLinks(); initializeLinks(); var iNumTopLevelItems = strTopLevelPages.length; var strHTML = ""; strHTML += ""; // // setup the outer table // strHTML += "